<style>
.page_detail{max-height:200px; overflow:scroll;}
</style>
<?php echo form_open('admin/pages/request/'.$this->uri->segment(4)); ?><!-- start title -->
<div class="title corners_top" style="float:left;width:400px;">
	<h6 id="tables" ><?php echo $title; ?></h6>
</div>
 <!-- end title -->
<div class="proccess_bar">
	<ul class="menu_bar">
	<?php if(0 == 1) {?>
    	<li>
        	<a href="<?php echo base_url(); ?>admin/pages/create/<?php echo $this->uri->segment(4);?>" ><span class="new-1"> </span>New</a>
        </li>
     	<li>
  			<?php  $data = array('name' => 'delete', 'value' => '','class'=>'delete-1', 'id' => 'delete', 'onClick' => "alert('Không thể xóa!'); return false;");
  					echo form_submit($data);
 			?>
			Delete
        </li>
    <?php }?>
    </ul>
 </div>
<div class="content">
        <?php
			if (!empty($result) &&is_array($result) )
			{
				echo '	<table cellspacing="1" class="tablesorter">';
				//title
					echo '<thead>';
						echo '<tr>';
							echo '<th width="50">';
								$data = array(
												'name'        => 'checkall',
												'id'          => 'checkall',
											 );
								echo '&nbsp;',form_checkbox($data ),'&nbsp;All';
							echo '</th>';
							echo '<th width="50">'.$this->lang->line('code').'</th>';
							echo '<th width="250">Tên Tiêu đề</th>';
							echo '<th width="250">Hình ảnh </th>';
							echo '<th>Trạng thái</th>';
							echo '<th >Ngày Cập nhật</th>';
							echo '<th width="70" >Chức năng</th>';
						echo'</tr>';
					echo '</thead>';
					echo '<tbody>';
						foreach ($result as $row)
						{
							echo '<tr>';
								echo '<td>';
									$data = array(
													'name'        => 'checkbox1[]',
													'id'          => 'checkbox1[]',
													'value'=>  $row['page_id']
												  );
									echo form_checkbox($data, $row['page_id']);
									echo '&nbsp;';
								echo '</td>';
								echo '<td>';
									echo $row['page_id'];
								echo '</td>';
								echo '<td >';
									echo  html_entity_decode($row['page_name'], ENT_QUOTES, 'UTF-8');
								echo '</td >';
								echo '<td align="center">';
									echo "<img width='120px' src='".base_url()."upload/pages/".$row['page_image']."'>";
								echo '</td>';
								echo '<td >';
									if($row['page_status'] == 1)
										echo 'hiển thị';
									else
										echo 'ẩn';
								echo '</td>';
								echo '<td >';
									echo date('d-m-Y h:i',($row['page_modify']));
								echo '</td>';
								echo '<td><!--<a href="javascript:();"><img src="'.base_url() .'public/images/admin/zoom.png" width="16" height="16" alt="preview" title="preview" /></a>-->';
								echo '<a href="'.base_url().'admin/pages/update/'.$row['page_cat'].'/'.$row['page_id'].'"><img src="'.base_url().'public/images/admin/edit.png" width="16" height="16" alt="edit" title="edit" /></a></td>';
								//echo '<!--a href="javascript:deleteRecord(\''.$row['page_id'].'\',\''.base_url().'admin/pages/delete/'.$row['page_cat'].'/'.$row['page_id'].'\');"><img src="'. base_url().'public/images/admin/delete.png" width="16" height="16" alt="delete" title="delete" /></a--></td>';
							echo '</tr>';
						}
					echo '</tbody>';
		?>
	</table>
    <!--    <div class="float_left margin_10_0">
			<a href="javascript:();"><img src="<?php echo base_url(); ?>public/images/admin/edit.png" width="16" height="16" alt="edit" /></a>
        	<a href="javascript:();"><img src="<?php echo base_url(); ?>public/images/admin/delete.png" width="16" height="16" alt="delete" /></a></div>
     -->
     <div class="pagination float_right margin_10_0">
		<?php echo $page; ?>
     </div>
     <?php
		 }
		else
		{
			echo '    <div><a href="javascript:();" title="Succes box" class="box warning corners"><span class="close">&nbsp;</span>Data does not exist</a></div>';

		}
		 ?>
</div><!-- end title -->
<?php echo form_close(); ?>